﻿@{
    ViewData["Title"] = "首页";
    Layout = null;
}

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>@ViewData["Title"]</title>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="shortcut icon" href="~/img/favicon.ico">
    <link href="@Html.AdminTheme("/easyui/themes/{0}/easyui.css","material")" _href="/easyui/themes/$theme$/easyui.css" _curtheme="@Html.AdminThemeVal("material")" rel="stylesheet" id="admintheme" />
    <link href="~/easyui/themes/icon.css" rel="stylesheet" />
    <link href="~/css/icon/icon.css"}}" rel="stylesheet" />
    <link href="~/lib/font-awesome/css/font-awesome.css"}}" rel="stylesheet">
    <link href="~/css/style.css" rel="stylesheet">
</head>
<body class="easyui-layout" style="overflow-y: hidden" scroll="no">
    <noscript>
        <div style="position:absolute; z-index:100000; height:2046px;top:0px;left:0px; width:100%; background:white; text-align:center;">
            <img src="images/noscript.gif" alt='抱歉，请开启脚本支持！' />
        </div>
    </noscript>
    <div data-options="region:'north',border:false" class="super-north">
        <!--顶部-->
        <div class="super-navigation">
            <!--系统名称-->
            <div class="super-navigation-title">SX后台管理</div>
            <!--自定义导航-->
            <div class="super-navigation-main">
                <div class="super-setting-left">
                    <ul>
                        <li><i class="fa fa-commenting-o"></i>消息</li>
                        <li><i class="fa fa-envelope-o"></i>邮件</li>
                        <li><i class="fa fa-bell-o"></i>通知</li>
                    </ul>
                </div>
                <div class="super-setting-right">
                    <ul>
                        <li>
                            <div class="super-setting-icon" style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;">
                                <i class="fa fa-gears"></i>
                            </div>
                            <div id="mmUser" class="easyui-menu">
                                <div id="themeSetting">主题</div>
                                <div class="menu-sep"></div>
                                <div id="loginOut">退出</div>
                            </div>
                        </li>
                        <li class="user"> <span class="user-icon"><img src="{{Avatar}}" /></span>@AuthHelper.GetUserid() </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!--
    <div  id="north" region="north" split="true" border="false" style="overflow: hidden; height: 30px;  line-height: 20px;  ">
        <span style="float:right; padding-right:20px;" class="head">
            皮肤:
            <input class="easyui-combobox" id="ddlTheme" style="width:100px;" data-options="
                   valueField: 'value',
                   textField: 'label',
                   url:'/home/Themes'"
                     value="{{themeval "material"}}"/>
            欢迎 <img src="{{asset user.Avatar}}" width="20" height="20" align="absmiddle" /> {{user.FullName}} <a href="#" id="editpass">修改密码</a> <a href="#" id="loginOut">安全退出</a>

        </span>
        <span style="padding-left:10px; font-size: 16px; "><img src="{{asset user.Avatar}}" width="20" height="20" align="absmiddle" /> 后台管理系统</span>
    </div>

    -->
    <div region="west" split="true" title="导航菜单" style="width:180px;" id="west">
        <div fit="true" border="false" id="menuList">
        </div>
    </div>
    <!--  主窗体 -->
    <div id="mainPanle" region="center" style="background: #eee; overflow-y:hidden">
        <div id="tabs" class="easyui-tabs" fit="true" border="false">
            <div title="欢迎使用" class="animated fadeInRight" style="padding:20px;overflow:hidden;" id="home">
                <h1>Welcome to jQuery easy UI!</h1>
            </div>
        </div>
    </div>
    <div data-options="region:'south'" class="super-south">
        <!--页脚-->
        <div class="super-footer-info">
            <span><i class="fa fa-info-circle"></i> 作者：rx.tang</span>
            <span><i class="fa fa-copyright"></i> CopyRight &copy; SX.ERP 2016-@DateTime.Now.Year 版权所有 <i class="fa fa-caret-right"></i></span>
        </div>
    </div>
    <!--修改密码窗口-->
    <div id="w" class="easyui-window" title="修改密码" collapsible="false" minimizable="false"
         maximizable="false" icon="icon-save" style="width: 300px; height: 150px; padding: 5px;
        background: #fafafa;">
        <div class="easyui-layout" fit="true">
            <div region="center" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
                <table cellpadding=3>
                    <tr>
                        <td>新密码：</td>
                        <td><input id="txtNewPass" type="Password" class="txt01" /></td>
                    </tr>
                    <tr>
                        <td>确认密码：</td>
                        <td><input id="txtRePass" type="Password" class="txt01" /></td>
                    </tr>
                </table>
            </div>
            <div region="south" border="false" style="text-align: right; height: 30px; line-height: 30px;">
                <a id="btnEp" class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)"> 确定 </a>
                <a id="btnCancel" class="easyui-linkbutton" icon="icon-cancel" href="javascript:void(0)">取消</a>
            </div>
        </div>
    </div>

    <!--主题设置弹窗-->
    <div id="win">
        <div class="themeItem" id="divThemes">
        </div>
    </div>

    <div id="mmTab" class="easyui-menu  animated fadeInRight" style="width:150px;">
        <div id="mm-tabclose">关闭</div>
        <div id="mm-tabcloseall">全部关闭</div>
        <div id="mm-tabcloseother">除此之外全部关闭</div>
        <div class="menu-sep"></div>
        <div id="mm-tabcloseright">当前页右侧全部关闭</div>
        <div id="mm-tabcloseleft">当前页左侧全部关闭</div>
        <div class="menu-sep"></div>
        <div id="mm-exit">退出</div>
    </div> 
    <!-- 全局js -->
    <script src="~/js/jquery.min.js"></script>
    <script src="~/lib/layer/layer.js"></script>
    <script src="~/easyui/jquery.easyui.min.js"></script>
    <script src="~/easyui/locale/easyui-lang-zh_CN.js"></script> 
    <!-- 自定义js -->
    <script src="~/js/sx/sx.code.js"></script>
    <!-- easyui 扩展 -->
    <script src="~/js/sx/sx.easyui.ext.js"></script>
    <script src="~/js/sx/sx.easyui.comboico.js"></script>
    <script src="~/js/main.js?v=1" ></script>
    <script src="~/js/pace.min.js" ></script>
    <script type="text/javascript">

        //设置登录窗口
        function openPwd() {
            $('#w').window({
                title: '修改密码',
                width: 300,
                modal: true,
                shadow: true,
                closed: true,
                height: 160,
                resizable: false
            });
        }
        //关闭登录窗口
        function closePwd() {
            $('#w').window('close');
        }

        //修改密码
        function serverLogin() {
            var $newpass = $('#txtNewPass');
            var $rePass = $('#txtRePass');

            if ($newpass.val() == '') {
                msgShow('系统提示', '请输入密码！', 'warning');
                return false;
            }
            if ($rePass.val() == '') {
                msgShow('系统提示', '请在一次输入密码！', 'warning');
                return false;
            }

            if ($newpass.val() != $rePass.val()) {
                msgShow('系统提示', '两次密码不一至！请重新输入', 'warning');
                return false;
            }

            $.post('/ajax/editpassword.ashx?newpass=' + $newpass.val(), function (msg) {
                msgShow('系统提示', '恭喜，密码修改成功！<br>您的新密码为：' + msg, 'info');
                $newpass.val('');
                $rePass.val('');
                close();
            })
        }

        $(function () {
            openPwd();
            // 修改密码
            $('#editpass').click(function () {
                $('#w').window('open');
            });

            $('#btnEp').click(function () {
                serverLogin();
            })

            $('#btnCancel').click(function () { closePwd(); })

            $("#ddlTheme").combobox({
                onChange: function (newTheme, oldTheme) {
                    $.cookie('sxtheme', newTheme);
                    sx.changeTheme(newTheme);
                    //$("#admintheme").attr("href", $("#admintheme").attr("href").replace("$theme$", newTheme));
                }
            })
        });
    </script>
</body>

</html>

